/**
 * @param {string} rings
 * @return {number}
 */
 var countPoints = function(rings) {
  const arr = new Array(10).fill('')
  for(let i = 0; i<rings.length; i+=2){
    let [c, x] = [rings[i], rings[i+1]]
    x = Number(x)
    arr[x] += c
  }
  const check = (str) => {
    return new Set(str).size === 3
  }
  let ans = 0
  for(let i = 0; i<10; i++){
    if(check(arr[i])){
      ans++
    }
  }
  return ans
};